<include file="Public:header" />
<script>
$(document).ready(function(e) {
    $('.showcurimg').each(function(index, element) {
        $(this).click(function(e) {
            $(this).find('img.img').show();
        });
		$(this).mouseleave(function(e) {
            $(this).find('img.img').hide();
        });
    });
});

	//通过弹出窗口的形式打开字段信息页面
	function openupedit(url){
		art.dialog.open(url, {width: 800, height: 400,lock:true,title:'字段编辑'/*, ok:function(){
			var d = this.iframe.contentWindow.document;
			var img_list = new Array();
			$(d).find("input[name='mimg_url[]']").each(function(index, element) {
                img_list.push("'"+$(this).val()+"'");
            });
			var imgcate_id = $(d).find("#imgcate_id").val();
			$.post('{:U('insert')}',{img_list:img_list.toString(),imgcate_id:imgcate_id},function(data){
				if(data=='OK'){
						window.location.href = url;
					}
			});
			return false;
		}*/});
	}
	
</script>

<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h"><a href="{:U('add')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>添加表单</a> </div>
    <div class="table_">
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <thead>
          <tr>
            <td align="center">ID</td>
            <td align="center">标题</td>
            <td align="center">所属分类</td>
            <td align="center">操作</td>
          </tr>
        </thead>
        <volist name="list" id="vo">
          <tr class="data_list">
            <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />
              {$vo.id}</td>
            <td align="center"><span class="ajaxText">{$vo.name}</span></td>
            <td align="center">{$vo.categoryname}</td>
            <td align="center"><!--<a href="{:U('Home/'.$siteid.'/'.$vo['cate_name'].'/'.$vo['id'])}" target="_blank">预览</a> | --> <a href="{:U('edit',array('id'=>$vo['id']))}">编辑/预览表单</a> | <a href="javascript:;"  onclick="openupedit('{:U('Field/index',array('id'=>$vo['id']))}');">编辑字段</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a></td>
          </tr>
        </volist>
      </table>
      <div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="mybutton" onclick="sall();">全选/反选</a> <a href="javascript:void(0);" class="mybutton" onclick="rall();">全不选</a> <a class="mybutton" href="javascript:void(0);" onclick="delall();">删除选中</a>
        
          
        </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
          <label class="form-inline"> 每页
            <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
              <option 
            
              <eq name="pagesize" value="10">selected="selected"</eq>
              
             value="10">10
            
              </option>
              <option 
            
              <eq name="pagesize" value="20">selected="selected"</eq>
              
             value="20">20
            
              </option>
              <option 
            
              <eq name="pagesize" value="30">selected="selected"</eq>
              
             value="30">30
            
              </option>
              <option 
            
              <eq name="pagesize" value="50">selected="selected"</eq>
              
             value="50">50
            
              </option>
              <option 
            
              <eq name="pagesize" value="100">selected="selected"</eq>
              
             value="100">100
            
              </option>
              <option 
            
              <eq name="pagesize" value="500">selected="selected"</eq>
              
             value="500">500
            
              </option>
            </select>
            条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />